﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using INSTA.BankApplication.Engine;
using NUnit.Framework;


namespace INSTA.BankApplication.Engine.Tests
{
    [TestFixture]
    public class Test_CrisisYearlyFeesStrategy
    {
        AccountBase _account;
        Customer _holder;
        double _amount;

        [Test]
        public void Test_Method_Run_ForStandardAccount()
        {
            _account = Bank.Instance().CreateAccount(new Customer(), AccountFactory.MIN_DEPOSIT_STANDARD);

            AccountStrategy strategy = new CrisisYearlyFeesStrategy();

            _account.ExecuteStrategy(strategy);

            Assert.IsTrue(_account.Balance == AccountFactory.MIN_DEPOSIT_STANDARD -6 );
        }


        [Test]
        public void Test_Method_Run_ForSilverAccount()
        {
            _account = Bank.Instance().CreateAccount(new Customer(), AccountFactory.MIN_DEPOSIT_SILVER);

            AccountStrategy strategy = new CrisisYearlyFeesStrategy();

            _account.ExecuteStrategy(strategy);

            Assert.IsTrue(_account.Balance == AccountFactory.MIN_DEPOSIT_SILVER - 4);
        }


        [Test]
        public void Test_Method_Run_ForGoldAccount()
        {
            _account = Bank.Instance().CreateAccount(new Customer(), AccountFactory.MIN_DEPOSIT_GOLD);

            AccountStrategy strategy = new CrisisYearlyFeesStrategy();

            _account.ExecuteStrategy(strategy);

            Assert.IsTrue(_account.Balance == AccountFactory.MIN_DEPOSIT_GOLD - 2);
        }















    }
}
